<script language="javascript">
	
 function wopen(url, name, w, h){
	  w += 32;
	  h += 96;
	  wleft = (screen.width - w) / 2;
	  wtop = (screen.height - h) / 2;
	  
	  if (wleft < 0) {
		w = screen.width;
		wleft = 0;
	  }
	  if (wtop < 0) {
		h = screen.height;
		wtop = 0;
	  }
	  var win = window.open(url,
		name,
		'width=' + w + ', height=' + h + ', ' +
		'left=' + wleft + ', top=' + wtop + ', ' +
		'location=no, menubar=no, ' +
		'status=no, toolbar=no, scrollbars=yes, resizable=no');
	  // Just in case width and height are ignored
	  win.resizeTo(w, h);
	  // Just in case left and top are ignored
	  win.moveTo(wleft, wtop);
	  win.focus();
}
function printTL(namhoc,hocki,mabm){
	
	wopen('intkthcuabm.php?namhoc='+namhoc+'&hocki='+hocki+'&mabm='+mabm+'','780','580');
}  
</script>
<?php
     
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $namhoc = $_POST['cbonamhoc'];
            $hocki = $_POST['cbohocki'];
			$makhoa = $_POST['cbokhoa'];
			$mabm = $_POST['cbobomon'];
            $maquyen = $_SESSION['nmaquyen'];
        if (isset($_POST['btnxem'])){
           
            /*$maso = " ";
            if ($maquyen == 'GV'){
                $maso = $_SESSION['nmaso'];
            }
            else if ($maquyen == 'AD'){
                $maso = $_POST['txtmaso'];
            }
            else{
                $maso = $_POST['cbomaso'];
            }*/
		
			
            $db->setQuery("select tenbm, tenkhoa  from BoMon a, Khoa b where mabm='".$mabm."' and a.makhoa = b.makhoa");
            $result = $db->fetchAll();
			
            $rows = mysql_fetch_array($result);
            $tenbm = $rows['tenbm'];
			$tenkhoa= $rows['tenkhoa'];
			require('Views/Xemtkthcuabm.php');
            require('Hienthitkthcuabm.php');
         
            
        }
		else  require('Views/Xemtkthcuabm.php');
        
        
    }
    else{
        if ($_GET['option']=='xemtkthbomon'){
			
            require('Views/Xemtkthcuabm.php');
        }
        
    }
  
                                
  
?>
